package org.example.fault.tolerant;

/**
 * @Title: TolerantStragety
 * @Author: kunliangzhao
 * @Package org.example.fault.tolerant
 * @Date: 2025/6/23 15:53
 * @Description: 容错策略
 */

import org.example.model.RpcResponse;

import java.util.Map;

public interface TolerantStrategy {

    /**
     * 容错
     *
     * @param context 上下文，用于传递数据
     * @param e       异常
     * @return
     */
    RpcResponse doTolerant(Map<String, Object> context, Exception e);
}

